home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
recio212.zip
/
history
< prev
next >
Wrap
Text File
|
1995-01-29
|
10KB
|
227 lines
recio, Version 2.12, Release January 29, 1995.
Copyright (C) 1994-1995, William Pierpoint.
HISTORY OF RECIO LIBRARY
01/29/95 - vers. 2.12
New improved field parsing engine derived from regular expression
specification is discussed in section 2.4 of design.txt. Primary
changes are:
* When the field delimiter is not whitespace and the text
delimiter is whitespace (or anytime the text delimiter
is not used even if defined as non-whitespace), leading
and lagging whitespace are not trimmed from a string field.
* When the text delimiter is not whitespace, the text
delimiter can be included as part of a field provided it
is not followed by the field termination sequence. The
field termination sequence consists of the text delimiter
followed by optional whitespace followed by either the
field delimiter or the end of the record. To illustrate
for comma delimited fields with quoted text, the following
is only one field: "K&R wrote, "Hello, World"".
* When the text delimiter is the double quote character,
quoted text within the field is treated as a single word.
The comma-delimited example "Use case "1", okay?" parses
to one field.
* Fixed a bug in how the rnumfld function counts fields.
When the field delimiter is whitespace, the rnumfld function
would count any trailing whitespace in the last field as an
extra empty field. The rnumfld function no longer counts any
empty fields when whitespace is used as the field separator
because empty fields are undetectable in this situation.
An expanded discussion of the ltoa and ultoa functions can now be
found in section 3.6 of design.txt. Included simple ltoa and ultoa
code for compilers that don't have these functions.
12/26/94 - vers. 2.11
Fixed some typos in spec.txt. Added section 3.6 to design.txt.
Made some minor stylistic improvements to the source code.
11/2/94 - vers. 2.10
Added new time fields. Can input and output times using either
the time_t or struct tm types and in various user specified formats.
New modules are rgett.c, rputt.c, rcgett.c, and rcputt.c.
Time formats are specified using a subset of the specifiers
from the ANSI-C strftime function. Supported specifiers are:
%d - day of month (1-31)
%H - hour from 24-hour clock (0-23)
%m - month (1-12)
%M - minute (0-59)
%s - second (0-61)
%y - year without century (00-99)
%Y - year with century (e.g. 1994)
The default time format is "%m/%d/%y". Can override the format on
any record stream with a new format using the rsettmfmt function.
Added new warning macro constant R_WTMFMT. R_WTMFMT indicates that
the time data was incomplete (i.e. any element of time format not
matched against data). Also new macro constants R_WFAULT and R_EFAULT
added for use by application specific functions.
Data written to an output stream can now be written without field and
text delimiters. Just set the field and text delimiters to the null
character.
10/10/94 - vers 2.04
Added new string functions scntrimbegs, scntrimends, and scntrims
to rstr.c file.
Fixed minor bug in _rfldstr function in rget.c file.
Changed return type for rskipfld and rskipnfld to unsigned, and
num parameter in rskipnfld to unsigned. Functions now return
zero on error.
Added new functions rnumfld, rgetfldpos, and rsetfldpos to rget.c
file.
10/02/94 - vers 2.03
Eliminated error return values for most functions. This promotes a
programming style that makes use of the callback error function as the
preferred way to handle errors. For lint users, reduces the number of
warnings.
Added macro ristxtfld. If ristxtfld macro returns non-zero, then the
current field (the field most recently input or output) was quoted with
the text character delimiter (if not white space). If ristxtfld macro
returns zero, then the current field was not quoted.
Added macro rresetrec. Use of the rresetrec macro allows you to read
the fields from the record buffer multiple times. For example, you
could first use rskipnfld to determine the number of fields, then use
rresetrec to reset back to the beginning of the record buffer, and
finally read in each field until you have reached the number of fields.
Added modules remsg.c and rwmsg.c containing simple callback functions
rerrmsg and rwarnmsg for reporting errors and warnings respectively.
You may wish to use these functions during the initial prototyping stage
of software development. In the later stages of development, you can
substitute more robust error and warning message functions. Also added
the rinit function that registers the error and warning message functions.
It just calls rseterrfn and rsetwarnfn, but may be easier to remember.
Added module rstr.c. This module contains a small set of string functions
that are needed by rget.c. You may also find them useful in your programs.
See section 7 of the ascii file USAGE.TXT for more details.
05/02/94 - vers 2.02
Handling of errno made more reliable and more portable. Some Borland C
conversion functions clear errno first, some do not. Where errno is
checked after a conversion, cleared errno before conversion.
Reduced code size of numeric field function modules by one-third by
eliminating the macro emulation of function templates. Number of header
files reduced from nine to one.
04/22/94 - vers 2.01
Added rsetrecstr function to rget.c. Sometimes it is handy to stuff a
record buffer with your own string, then let the field input functions
scan it.
Added mode check to several rget.c functions to ensure an error will be
generated if these input functions are mistakenly used in an output stream.
Fixed bugs in rwarn.c. Warnings were not being cleared or reset correctly.
04/15/94 - vers 2.00
RECIO can now write as well as read. Over 25 new functions added.
New record streams that are always open are recout, recerr, and recprn.
New predefined context numbers are RECOUT, RECERR, and RECPRN.
ROPEN_MAX increased from 5 to 8.
New symbolic error constants are:
R_EINVMOD - tried to read file opened in write mode, or vice versa.
R_ENOPUT - unable to output data.
New callback warning function and associated warning functions.
Now all empty data strings are trapped as warnings. Application can
choose to handle them or to ignore them. Failure of atexit function
is changed from an error to a warning.
New symbolic warning constants:
R_WEMPSTR - data string is empty.
R_WWIDTH - data too wide for columnar output.
R_WNOREG - unable to register exit function with atexit().
(changed from error symbolic constant R_ENOREG).
04/8/94 - vers 1.20
Created new rerrstr and rstrerror functions. Simplified TESTCH.C and
TESTCO.C code by using rerrstr.
Changed the specification and code for the rgets and rcgets functions to
return a pointer to an empty string (rather than a null pointer) on error.
This will help reduce null pointer errors in application programs.
Changed the specification and code for the rgetrec function. The rgetrec
function now clears the record buffer before the next record is read.
This will cause the error number to be set to R_EMISDAT if the application
ignores the eof indicator and attempts to read fields in records beyond
end-of-file. There is one exception: if the field just prior to the record
buffer string terminator is a string field (which for an empty record buffer
is the first field), it won't be trapped as missing data. This is an
unavoidable consequence of allowing empty string fields. But you shouldn't
be ignoring end-of-file anyway! Also rgetrec continues to increment the
record number if the program reads beyond end of file. This solves an
"off by one" bug when the file ends prematurely.
Developed the dif program to locate line where two text files first
differ. Inserted dif source into TUTOR.TXT to illustrate a very simple
callback error function. Substituted the dif program for the cmp program
in regression test TEST.BAT.
04/5/94 - vers 1.11
When is the minimum not the minimum? MIN values in <float.h> are defined
differently than in <limits.h>. Fixed code to match definitions in
ANSI X3.159-1989 Section 2.2.4.2.
RECIO now tests for underflow and overflow of all floating point numbers
input. Test results TESTCH.OUT shows when overflow and underflow occur.
Created new rfix functions to provide a quick way to fix overflows and
underflows, and to get callback error functions up and running more
quickly.
03/28/94 - vers 1.10
Created single precision floating point functions rgetf() and rcgetf().
Created functions rsetbegcolno() and rbegcolno() to make it easy to
have column numbering start at either 0 or 1. Default is 0.
Created program TESTCO to test column delimited fields; enhanced test
program TESTCH for character delimited fields.
Created new symbolic error constants for record streams. Program must
use symbolic constants starting with R_ (such as R_EINVDAT) for valid
record streams; use errno constants (such as ENOMEM) for invalid record
streams. New error checking provides better reporting and portability.
New symbolic error constants are not compatible with version 1.00;
some rework of version 1.00 callback error functions required.
Fixed some bugs in the column delimited functions.
03/23/94 - vers 1.00
Initial public release.